import javax.swing.*;
import java.awt.*;


public class ViewSimple extends View<Controller>{

    private JLabel label;

    public JLabel getLabel() {
        return label;
    }


    public ViewSimple(Library m, Controller c) {
        super(m,c);
        setLayout(new GridLayout(1,1));
        label = new JLabel("Total number of borrowed books: " + this.m.totalBorrowedBooks());
        add(label);
    }

    @Override
    public void update() {
        label.setText("Total number of borrowed books: " + this.m.totalBorrowedBooks());
    }
}
